<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>事件系统</title>
    <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" />
   
    <style>
        html,
        body,
        #container {
          width: 100%;
          height: 100%;
        }
    </style>
</head>
<body>
<div id="container"></div>


<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=a96ad63a90f681afe21b96f68473d401"></script>
<script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script>
<script type="text/javascript">
    //初始化地图对象，加载地图
    var map = new AMap.Map("container", {
        resizeEnable: true
    });
    function showInfoClick(e){
        console.log(e.lnglat.getLng(), e.lnglat.getLat());
    }
    function clickOn(){
        map.on('click', showInfoClick);
    }
    clickOn()
</script>
</body>
</html>